/**
 *  生成图片名
 *  反向：通过图片名可获取用户唯一主键
 */
module.exports = ({ userPk, imgType = 'png' }) => {
    let nowTime = String(Date.now());
    let t_1 = nowTime.slice(0, 5)
    let t_2 = nowTime.slice(5)
    let s1 = Math.random().toString(36).slice(-1)
    let s2 = Math.random().toString(36).slice(-1)
    let imgName = `${t_1}${s1}${userPk}${s2}${t_2}`;
    return `${imgName}.${imgType}`;
}